home *** CD-ROM | disk | FTP | other *** search
/ Borland JBuilder 6 / jbuilder6.iso / Documents / JAVA Programming / examples / 16 / TextAreaDemo.java < prev    next >
Encoding:
Java Source  |  2000-09-08  |  1.1 KB  |  27 lines

  1. /* <applet code = "TextAreaDemo" width=200 height=100>
  2.    </applet>
  3. */ 
  4. import java.awt.*;
  5. import java.applet.*;
  6. public class TextAreaDemo extends Applet { 
  7. public void init() { 
  8. setLayout(null);
  9. int width = Integer.parseInt(getParameter("width"));
  10. int height = Integer.parseInt(getParameter("height"));
  11. String val = "There are two ways of constructing " + 
  12.              "a software design.\n" + 
  13.              "One way is to make it so simple\n" + 
  14.              "that there are obviously no deficiencies.\n" + 
  15.              "And the other way is to make it so complicated\n" +
  16.              "that there are no obvious deficiencies.\n\n" + 
  17.              "C.A.R. Hoare\n\n" +
  18.              "There's an old story about the person who wished\n" +
  19.              "his computer were as easy to use as his telephone. \n" +
  20.              "That wish has come true,\n" +
  21.              "since I no longer know how to use my telephone. \n\n" +
  22.              "Bjarne Stroustrup, AT&T (inventor of C++)";
  23. TextArea text = new TextArea(val,  80,  40);
  24. add(text);
  25. text.setBounds(0,  0,  width,  height);
  26. }}
  27.